import website from '@/config/website'

const common = {
	state:{
		isCollapse: false,
		website:website,
		imgPreviewPrefix:website.imgPreviewPrefix,
		screen: -1,
		mainContentHeight:0

	},
	mutations:{
		SET_SCREEN: (state, screen) => {
	      state.screen = screen;
	    },
	    SET_COLLAPSE: (state) => {
	      state.isCollapse = !state.isCollapse;
	    },
	    //保存内容区域高度
	    SET_MAIN_CONTENT_H: (state,h) => {
	    	state.mainContentHeight = h;
	    }
	},
	actions:{
		setMainContentHeight({ commit },height){
			commit('SET_MAIN_CONTENT_H',height)
		}
	}

}

export default common